//
//  FWProgressRingView.m
//  BirdLoveSheep
//
//  Created by wwj on 16/3/23.
//  Copyright © 2016年 wwj. All rights reserved.
//

#import "FWProgressRingView.h"

@implementation FWProgressRingView


- (instancetype)initWithCoder:(NSCoder *)coder{
    self = [super initWithCoder:coder];
    if (self) {
        [self initView];
    }
    return self;
}

- (void)initView{
    self.roundedCorners = 3;
    self.progressLabel.textColor = [UIColor whiteColor];
}

- (void)setProgress:(CGFloat)progress animated:(BOOL)animated{
    [super setProgress:progress animated:animated];
    NSString *str = [NSString stringWithFormat:@"%.f%%",progress * 100];
    self.progressLabel.text = [str stringByReplacingOccurrencesOfString:@"-" withString:@""];
}

- (void)setFrame:(CGRect)frame{
    frame.size = CGSizeMake(100, 100);
    [super setFrame:frame];
}

@end
